#pragma once

#include "Dream/Core/Core.h"

#ifdef DM_PLAT_WIN
#ifndef DM_NOUSE_ENTRYPOINT

extern Dream::Application* Dream::CreateApplication();
// For use by Dream applications
int main(int argc, char** argv)
{
	Dream::Log::Init();
	DM_CORE_INFO("Initialized Log!");
	
	DM_PROFILE_BEGIN_SESSION("Startup", "Profile-Startup.json");
	auto app = Dream::CreateApplication();
	DM_PROFILE_END_SESSION();

	DM_PROFILE_BEGIN_SESSION("Runtime", "Profile-Runtime.json");
	app->Run();
	DM_PROFILE_END_SESSION();

	DM_PROFILE_BEGIN_SESSION("Shutdown", "Profile-Shutdown.json");
	delete app;
	return 0;
	DM_PROFILE_END_SESSION();
}

#endif // DM_NOUSE_ENTRYPOINT
#endif // DM_PLAT_WIN
